package com.gglx.mobile.extenstions
{
	public class GGVibration
	{
		//private static var vibration:Vibration;

		public function GGVibration()
		{
		}

		public static function init():void
		{
			/*
			if (Vibration.isSupported)
			{
				vibration=new Vibration();
			}
			//*/

			/*
			try
			{
				Vibration.init(GlobalConfig.DEV_KEY);

				trace("Vibration Supported: " + String(Vibration.isSupported));
				trace("Vibration Version: " + Vibration.service.version);
			}
			catch (e:Error)
			{
				trace(e.message);
			}
			//*/
		}

		public static function vibrate(duration:Number=36):void
		{
			/*
			if (Vibration.isSupported)
			{
				vibration.vibrate(duration);
			}
			//*/

			/*
			try
			{
				trace("Sending vibrate command...");

				if (Vibration.isSupported)
				{
					Vibration.service.vibrate(duration);
				}
			}
			catch (e:Error)
			{
				trace(e.message);
			}
			//*/
		}
	}
}
